package com.ruoyi.certificate.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.certificate.mapper.CertificateCountMapper;
import com.ruoyi.certificate.domain.CertificateCount;
import com.ruoyi.certificate.service.ICertificateCountService;

/**
 * 合格证打印记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-05
 */
@Service
public class CertificateCountServiceImpl implements ICertificateCountService 
{
    @Autowired
    private CertificateCountMapper certificateCountMapper;

    /**
     * 查询合格证打印记录
     * 
     * @param id 合格证打印记录主键
     * @return 合格证打印记录
     */
    @Override
    public CertificateCount selectCertificateCountById(Long id)
    {
        return certificateCountMapper.selectCertificateCountById(id);
    }

    /**
     * 查询合格证打印记录列表
     * 
     * @param certificateCount 合格证打印记录
     * @return 合格证打印记录
     */
    @Override
    public List<CertificateCount> selectCertificateCountList(CertificateCount certificateCount)
    {
        return certificateCountMapper.selectCertificateCountList(certificateCount);
    }

    /**
     * 新增合格证打印记录
     * 
     * @param certificateCount 合格证打印记录
     * @return 结果
     */
    @Override
    public int insertCertificateCount(CertificateCount certificateCount)
    {
        certificateCount.setCreateTime(DateUtils.getNowDate());
        return certificateCountMapper.insertCertificateCount(certificateCount);
    }

    /**
     * 修改合格证打印记录
     * 
     * @param certificateCount 合格证打印记录
     * @return 结果
     */
    @Override
    public int updateCertificateCount(CertificateCount certificateCount)
    {
        certificateCount.setUpdateTime(DateUtils.getNowDate());
        return certificateCountMapper.updateCertificateCount(certificateCount);
    }

    /**
     * 批量删除合格证打印记录
     * 
     * @param ids 需要删除的合格证打印记录主键
     * @return 结果
     */
    @Override
    public int deleteCertificateCountByIds(Long[] ids)
    {
        return certificateCountMapper.deleteCertificateCountByIds(ids);
    }

    /**
     * 删除合格证打印记录信息
     * 
     * @param id 合格证打印记录主键
     * @return 结果
     */
    @Override
    public int deleteCertificateCountById(Long id)
    {
        return certificateCountMapper.deleteCertificateCountById(id);
    }
}
